import request from '@/utils/request'

// 查询工艺路径版本列表
export function listVersions(query) {
  return request({
    url: '/mes/versions/list',
    method: 'get',
    params: query
  })
}

// 查询工艺路径版本详细
export function getVersions(versionsId) {
  return request({
    url: '/mes/versions/' + versionsId,
    method: 'get'
  })
}

// 新增工艺路径版本
export function addVersions(data) {
  return request({
    url: '/mes/versions',
    method: 'post',
    data: data
  })
}

// 修改工艺路径版本
export function updateVersions(data) {
  return request({
    url: '/mes/versions',
    method: 'put',
    data: data
  })
}

// 删除工艺路径版本
export function delVersions(versionsId) {
  return request({
    url: '/mes/versions/' + versionsId,
    method: 'delete'
  })
}

// 通过工艺路径id查询生产工序
export function getProcesses(routeId) {
  return request({
    url: '/mes/pro/routeprocess/process/' + routeId,
    method: 'get'
  })
}
